﻿using Microsoft.AspNetCore.Mvc;
using RTW.Core.Controllers;
using RTW.Model;
using RTW.Servers;
using System.Data;
using System.Threading.Tasks;
using System;
using Microsoft.AspNetCore.Mvc.Rendering;
using Newtonsoft.Json;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using System.IO;
using System.Runtime.Serialization.Json;
using System.Text;

namespace RTW.Web.Areas.FilesApply.Controllers
{
    [Area("FilesApply")]
    public class FilesApplyController : BaseController
    {
        public TFilesApplyServer filesApplyServer;
        public FilesApplyController()
        {
            filesApplyServer = new TFilesApplyServer();
        }
        public IActionResult Index()
        {
            return View();
        }

        public IActionResult WenShu()
        {
            return View();
        }

        public IActionResult SuSong()
        {
            return View();
        }

        public IActionResult FilesApply()
        {
            return View();
        }

        public async Task<IActionResult> getFilesApply(int? state)
        {
            var model = ListResult <TFilesApply> (await filesApplyServer.GetAllApplyWhere(state));
            return Json(model);
        }

        [HttpPost]
        public async Task<IActionResult> EditFilesApply(TFilesApply data)
        {
            var rsult = await filesApplyServer.Edit(data);
            return Json(rsult);
        }


    }
}